//
//  ModelingSelectPublishCell.m
//  ShrimpCrowdordering
//
//  Created by jimmy on 2018/8/28.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "ModelingSelectPublishCell.h"
#import "UIView+Utils.h"

@interface ModelingSelectPublishCell()

@property (nonatomic, strong) NSIndexPath * indexpath;

@end

@implementation ModelingSelectPublishCell

+ (ModelingSelectPublishCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    
    ModelingSelectPublishCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ModelingSelectPublishCell"];
    if (cell == nil) {
        cell = [[ModelingSelectPublishCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ModelingSelectPublishCell"];
        cell.indexpath = indexPath;
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
        [cell creatTableView];
    }
    
    return cell;
    
}

-(void)creatTableView
{
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(16), ScreenX375(20), ScreenX375(70), ScreenX375(20))];
    self.titleLabel.textAlignment = NSTextAlignmentLeft;
    self.titleLabel.textColor = FONTCOLOR_BLACK;
    self.titleLabel.font = KBlodfont(16);
    [self addSubview:self.titleLabel];
    
    self.contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.titleLabel.right+ScreenX375(10), ScreenX375(15), SCREEN_WIDTH-ScreenX375(112), ScreenX375(20))];
    self.contentLabel.textAlignment = NSTextAlignmentCenter;
    self.contentLabel.textColor = FONTCOLOR_BLACK;
    self.contentLabel.font = Kfont(16);
    [self addSubview:self.contentLabel];
    
    UILabel *lineLabel = [[UILabel alloc] init];
    lineLabel.frame = CGRectMake(0, ScreenX375(23), self.contentLabel.width, ScreenX375(1));
    lineLabel.backgroundColor = UIColorFromRGB(@"#eaeaea", 1);
    [self.contentLabel addSubview:lineLabel];
    
}

@end
